package cn.tedu.spring.eg3;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class ShopController {
    private String shopname;

    public ShopController() {
        System.out.println("1.选择一个城市");
    }
@Value("选择一个街道")
    public void setShopname(String shopname) {
        this.shopname = shopname;
    System.out.println("2.选择一个小区");
    }
    @PostConstruct
    public void start(){
        System.out.println("3.起一个名字");
    }
    @PreDestroy
    public void run(){
        System.out.println("5.开始营业");
    }
}
